
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>swarm管理工具Portainer · docker swarm实践文档</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Carey">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="群集监控.html" />
    
    
    <link rel="prev" href="创建群集.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://carey.akhack.com" target="_blank" class="custom-link">Home</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    基础环境
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../base_book/环境介绍.html">
            
                <a href="../base_book/环境介绍.html">
            
                    
                    环境介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../base_book/环境准备.html">
            
                <a href="../base_book/环境准备.html">
            
                    
                    基础准备
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../base_book/安装docker.html">
            
                <a href="../base_book/安装docker.html">
            
                    
                    安装 docker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../base_book/compose_file.html">
            
                <a href="../base_book/compose_file.html">
            
                    
                    compose file文档
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../base_book/registry仓库管理.html">
            
                <a href="../base_book/registry仓库管理.html">
            
                    
                    registry管理
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    swarm 群集
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="创建群集.html">
            
                <a href="创建群集.html">
            
                    
                    创建群集
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3.2" data-path="portainer.html">
            
                <a href="portainer.html">
            
                    
                    swarm管理工具Portainer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="群集监控.html">
            
                <a href="群集监控.html">
            
                    
                    cAdvisor InfluxDB Grafana搭建监控平台
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="telegraf.html">
            
                <a href="telegraf.html">
            
                    
                    Telegraf监控容器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="Chronograf.html">
            
                <a href="Chronograf.html">
            
                    
                    Chronograf显示监控数据
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    swarm service
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../service_book/nginx.html">
            
                <a href="../service_book/nginx.html">
            
                    
                    部署nginx服务
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    swarm stack
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../swarm_stack/lnmpwordpress.html">
            
                <a href="../swarm_stack/lnmpwordpress.html">
            
                    
                    部署wordpress
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../swarm_stack/build_eureka.md">
            
                <span>
            
                    
                    部署eureka
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >swarm管理工具Portainer</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="portainer">portainer</h1>
<h2 id="&#x7B80;&#x4ECB;">&#x7B80;&#x4ECB;</h2>
<p>Portainer &#x662F;&#x4E00;&#x4E2A;&#x8F7B;&#x91CF;&#x7EA7;&#x7684;web UI&#x7BA1;&#x7406;&#x5DE5;&#x5177;&#xFF0C;&#x53EF;&#x4EE5;&#x8F7B;&#x677E;&#x7BA1;&#x7406;&#x4E0D;&#x540C;&#x7684;Docker&#x73AF;&#x5883;(docker&#x4E3B;&#x673A;&#x548C;swarm&#x7FA4;&#x96C6;)</p>
<p><strong>github: <a href="https://github.com/portainer/portainer" target="_blank">Portainer</a></strong></p>
<h2 id="demo">demo</h2>
<p><img src="https://camo.githubusercontent.com/cd0c51488186a62235f4223cc9df3cec3fc975ee/68747470733a2f2f706f727461696e65722e696f2f696d616765732f73637265656e73686f74732f706f727461696e65722e676966" alt=""></p>
<h2 id="&#x90E8;&#x7F72;-portainer">&#x90E8;&#x7F72; portainer</h2>
<p><strong><a href="https://portainer.readthedocs.io/en/latest/deployment.html" target="_blank">&#x5B98;&#x65B9;&#x6587;&#x6863;</a></strong></p>
<h3 id="&#x4E0B;&#x8F7D;portainer&#x955C;&#x50CF;">&#x4E0B;&#x8F7D;portainer&#x955C;&#x50CF;</h3>
<pre><code>docker pull portainer/portainer
</code></pre><h3 id="&#x521B;&#x5EFA;&#x6570;&#x636E;&#x76EE;&#x5F55;">&#x521B;&#x5EFA;&#x6570;&#x636E;&#x76EE;&#x5F55;</h3>
<pre><code>mkdir -p /data/portainer
</code></pre><h3 id="&#x7B80;&#x5355;&#x8FD0;&#x884C;portainer">&#x7B80;&#x5355;&#x8FD0;&#x884C;portainer</h3>
<pre><code>docker run -d -p 9000:9000 --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /data/portainer:/data portainer/portainer
</code></pre><p>&#x8BBF;&#x95EE;portainer <a href="http://10.0.20.120:9000" target="_blank">http://10.0.20.120:9000</a></p>
<blockquote>
<p><strong>[info] <code>-v /var/run/docker.sock:/var/run/docker.sock</code>&#x53EA;&#x9002;&#x7528;&#x4E8E;linux&#xFF0C;&#x7528;&#x4E8E;portainer&#x901A;&#x8FC7;&#x8FDE;&#x63A5;docker&#xFF0C;&#x4E5F;&#x53EF;&#x4F7F;&#x7528;tcp&#x65B9;&#x5F0F;</strong></p>
<p><strong>[warning]&#x5982;&#x679C;&#x4F60;&#x4F7F;&#x7528;&#x4E86;<code>selinux</code>&#xFF0C;&#x8BF7;&#x52A0;&#x4E0A;<code>--privileged</code>&#x9009;&#x9879;</strong></p>
<p><strong><code>-v /data/portainer:/data</code> portainer&#x6570;&#x636E;&#x5B58;&#x50A8;&#x5230;&#x672C;&#x5730;&#xFF0C;&#x9632;&#x6B62;&#x5BB9;&#x5668;&#x505C;&#x6B62;&#x6570;&#x636E;&#x4E22;&#x5931;</strong></p>
</blockquote>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="创建群集.html" class="navigation navigation-prev " aria-label="Previous page: 创建群集">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="群集监控.html" class="navigation navigation-next " aria-label="Next page: cAdvisor InfluxDB Grafana搭建监控平台">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"swarm管理工具Portainer","level":"1.3.2","depth":2,"next":{"title":"cAdvisor InfluxDB Grafana搭建监控平台","level":"1.3.3","depth":2,"path":"swarm_book/群集监控.md","ref":"swarm_book/群集监控.md","articles":[]},"previous":{"title":"创建群集","level":"1.3.1","depth":2,"path":"swarm_book/创建群集.md","ref":"swarm_book/创建群集.md","articles":[]},"dir":"ltr"},"config":{"plugins":["emphasize","alerts","code","-lunr","-search","search-plus","splitter"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"emphasize":{},"splitter":{},"code":{"copyButtons":true},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"alerts":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"search-plus":{}},"theme":"default","author":"Carey","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"docker swarm实践文档","language":"zh-hans","links":{"sidebar":{"Home":"http://carey.akhack.com"}},"gitbook":"*"},"file":{"path":"swarm_book/portainer.md","mtime":"2018-07-06T03:01:13.282Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-12-04T03:25:36.834Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-alerts/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

